<?php

class Document extends Eloquent {

	/**
	 * The database table used by the model.
	 *
	 * @var string
	 */
	protected $table = 'documents';
	
	/**
     * Get the document index a document has
     */
    public function template()
    {
        return $this->hasOne('Template');
    }
	
	/**
     * Get the document index a document has
     */
    public function documentIndex()
    {
        return $this->hasMany('documentIndex');
    }
}
